<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>041-switch.html</title>
</head>
<body>
	
</body>
<script>
	var w = 8;
	var a = "3";
	switch(w){
		case 1:
			alert("今天星期一");
			break;
		case 2:
			alert("今天星期二");
			break;
		case a:
			alert("今天星期三");
			break;
		case 4:
			alert("今天星期四");
			break;
		case 5:
			alert("今天星期五");
			break;
		case 6:
			alert("今天星期六");
			break;
		case 7:
			alert("今天星期日");
			break;
		default:
			alert("请输入正确的数字");
	}
</script>
</html>